# -*- coding: utf-8 -*-
# @Time    : 2018/2/23 10:16
# @Author  : Soft
# @File    : create_db.py
# @Desc    : 用来创建数据表
from module.models import *
db.create_tables([Admin, Student, Class, Record, Work, z_study, z_study_record, Location])

try:
    Admin.select().where(Admin.ad_name=='admin').get()
except BaseException as e:
    print(e)
    Admin.insert(ad_name='admin', ad_pass='admin').execute()
